<?php

namespace Home\Controller;

use Business\StrategyFactory;
use Common\Controller\BaseController;


class HomeController extends BaseController
{
    public function index()
    {
        $iHomePageStrategy = StrategyFactory::create_homePageStrategy($this);
        $iHomePageStrategy->index();

//        echo $iHomePageStrategy->view_path();
//        exit();
        $this->display($iHomePageStrategy->view_path());
    }

    public function countByDepart()
    {
        $depart_id = $_GET['departid'];

        $list=fc_get_temp_statistics_by_depart_id($depart_id);
        echo json_encode($list,JSON_UNESCAPED_UNICODE);
        exit();
    }
}